package vtc;

import java.util.concurrent.*;
import java.io.*;

// One single input queue and one single output queue

class FanOutUnit extends VtcUnit 
{
	FanOutUnit(String id, VtcArrayBlockingQueue inQueues[], VtcArrayBlockingQueue outQueues[]) 
	{
		super(id, inQueues, outQueues);
	}
	
	public void process() throws InterruptedException
	{
		VtcTimeTaggedEvent inValue = inQueues_[0].take();
		for(int i = 0; i < outQueues_.length; i++)
		{
			outQueues_[i].forcePut(inValue);
		}
	}
}